package com.gome.ocean.service.authority.impl;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gome.ocean.dao.authority.UserLoginLogoutDAO;
import com.gome.ocean.dao.model.authority.UserLoginLogoutBO;
import com.gome.ocean.service.authority.IUserLoginLogoutService;


/**
 * 
 *
 * @author zhangguoqing
 */
@Service(value="userLoginLogoutService")
public class UserLoginLogoutServiceImpl  implements IUserLoginLogoutService{

	@Autowired
	private UserLoginLogoutDAO userLoginLogoutDao;
	
	/**
	 * 插入用户登录退出信息
	 * */
	@Override
	public Long insertUserLoginLogoutInfo(UserLoginLogoutBO loginLogoutBO) {
		try {
			Long id = userLoginLogoutDao.saveUserLoginLogoutBO(loginLogoutBO);
			return id;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}

	@Override
	public UserLoginLogoutBO getUserLoginLogoutInfoByMap(Map<String, Object> map) {
		
		return userLoginLogoutDao.getUserLoginLogoutInfoByMap(map);
	}

	@Override
	public boolean updateUserLoginLogoutInfoByMap(Map<String, Object> map) {
		try {
			userLoginLogoutDao.updateUserLoginLogoutInfoByMap(map);
			return true;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return false;
	}
	
	
	
}
